//
//  ViewController.m
//  应用程序对象
//
//  Created by 伍银荣 on 2021/6/20.
//  Copyright © 2021 com.example. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

-(void)loadView {
    [super loadView];
    
    NSLog(@"加载视图");
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    NSLog(@"视图加载完成");
}
- (IBAction)btnClicked:(id)sender {
    //获取info.plist文件的内容
    NSDictionary *dict = [NSBundle mainBundle].infoDictionary;
   // NSLog(@"dict = %@",dict);
    
    HMLog(@"dict = %@", dict);
    
    UIApplication *app =  [UIApplication sharedApplication];
    NSLog(@"%d",app.isStatusBarHidden);
    UIUserNotificationCategory *category = [[UIUserNotificationCategory alloc]init];
    NSSet *set = [NSSet setWithObject:category];
    UIUserNotificationSettings *setting = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:set];
    [app registerUserNotificationSettings:setting];
    
   // [UNUsernotificationCenter requestAuthorizationWithOptions:]
    
//    UNUserNotificationCenter *center =
    
        app.applicationIconBadgeNumber = 10;
    
}


@end
